import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login'
import Header from '@/components/header'
import Edit from '@/view/edit'
import List from '@/view/list'


Vue.use(Router)

const router = new Router({
    linkActiveClass: 'active',
    mode: "history",
    routes: [{
            path: '/login',
            name: 'Login',
            component: Login
        },
        {
            path: '',
            name: 'Header',
            component: Header,
            children: [{
                    path: '/edit',
                    name: 'Edit',
                    component: Edit
                },
                {
                    path: '/list',
                    name: 'List',
                    component: List
                }
            ]
        }
    ]
})
export default router